package org.bingmaps.app;

import java.util.Calendar;

import locationServices.GetGpsCoordinate;
import locationServices.MyLocationListener;
import General.GlobalValueClass;
import android.location.LocationListener;
import android.location.LocationManager;
import android.os.Build;
import android.os.Bundle;
import android.annotation.SuppressLint;
import android.annotation.TargetApi;
import android.app.Activity;
import android.app.NotificationManager;
import android.app.PendingIntent;
import android.support.v4.app.TaskStackBuilder;
import android.content.Context;
import android.content.Intent;
import android.support.v4.app.NotificationCompat;
import android.util.Log;
import android.view.Menu;
import android.view.View;

public class NowTracking extends Activity {

	
	private int Frequency; 

	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_now_tracking);
		Intent i = getIntent();
        Frequency = Integer.valueOf(i.getStringExtra("Frequency"));
        InitTracking();
	}

	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		// Inflate the menu; this adds items to the action bar if it is present.
		getMenuInflater().inflate(R.menu.now_tracking, menu);
		return true;
	}


	public void EventStopButton(View view){ 
		GlobalValueClass.Get_GetGpsCoordinate().SetKeepTracking(false);
		
		Intent intent = new Intent(getApplicationContext(), MainActivity.class);
    	startActivity(intent);

		finish();
	}
	
	
	
	void InitTracking(){ 
		GlobalValueClass.ChangeContext(getApplicationContext());
		GlobalValueClass.Inititalize(Frequency);	
	}
	
	
}
